.PHONY: all
.PHONY: force
.PHONY: def
.PHONY: out
.PHONY: clean

OUTPUT = /mnt/sdcard/_common/cat.pdf
LECTS := lect*.tex

current: current.tex $(LECTS)
	pdflatex current.tex

all: def;

windows: cat.tex
	makeindex cat.idx
	pdflatex cat.tex

def: out;

cat.pdf: cat.tex
	makeindex cat.idx
	pdflatex cat.tex

$(OUTPUT): cat.pdf
	sudo -- cp cat.pdf $(OUTPUT)

out: $(OUTPUT);

clean:
	del *~
	del *.log
	del *.xyc
	del *.swp
	del *.aux
	del *.idx
	del *.ilg
	del *.ind
	del *.toc
